import request from '@/utils/request'
/**
 * 角色相关API
 */
// 获取角色列表
export const getRoles = data => {
  return request({
    method: 'POST',
    url: '/admin/role/get_roles',
    data,
    auth: 'Role'
  })
}
// 添加角色
export const addRole = data => {
  return request({
    method: 'POST',
    url: '/admin/role/add_role',
    data,
    auth: 'AddRole'
  })
}
// 编辑角色
export const editRole = data => {
  return request({
    method: 'POST',
    url: '/admin/role/edit_role',
    data,
    auth: 'EditRole'
  })
}
// 修改角色状态
export const statusRole = data => {
  return request({
    method: 'POST',
    url: '/admin/role/status_role',
    data,
    auth: 'DelRole'
  })
}
// 角色授权
export const authRole = data => {
  return request({
    method: 'POST',
    url: '/admin/role/auth_role',
    data,
    auth: 'AuthRole'
  })
}
